import request from '../request.js'
import {
  API, APPAPI
} from '../const';

// 获得订单列表
export function apiGetOrdersList() {
  return request({
    url: `${API}/order/list`,
  })
}

// 获得该订单的物流信息
export function apiGetOrdersDelivery(id) {
  return request({
    url: `${APPAPI}/order/${id}`,
  })
}

// 提交订单
export function apiSubmitOrder(data) {
  return request({
    url: `${APPAPI}/order`,
    method: 'post',
    data
  })
}